<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改请假记录')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-leave-edit" th:object="${studentLeave}">
            <input name="studentLeaveId" th:field="*{studentLeaveId}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">学生ID：</label>
                <div class="col-sm-8">
                    <input name="studentId" readonly="readonly"  th:field="*{studentId}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">请假原因：</label>
                <div class="col-sm-8">
                    <input name="reason" readonly="readonly" th:field="*{reason}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">是否通过：</label>
                <div class="col-sm-8">
                    <select name="state" th:field="*{state}" class="form-control" type="text" required>
                        <option value="0">未审批</option>
                        <option value="1">通过</option>
                        <option value="2">拒绝</option>
                    </select>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "system/leave";
        $("#form-leave-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-leave-edit').serialize());
            }
        }
    </script>
</body>
</html>